package com.haruhinav.service.impl;

import com.haruhinav.entity.StartNote;
import com.haruhinav.mapper.StartNoteMapper;
import com.haruhinav.service.StartNoteService;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody;

import javax.annotation.Resource;
import java.util.List;

@Service
public class StartNoteServiceImpl implements StartNoteService {

    @Resource
    private StartNoteMapper startNoteMapper;
    /**
     * 根据用户id获取
     * @param note
     * @return
     */
    @Override
    public List<StartNote> getListByUser(StartNote note) {

        return startNoteMapper.getListByUser(note);
    }

    /**
     * 添加
     * @param note
     * @return
     */
    @Override
    public int addNote(StartNote note) {
        return startNoteMapper.addNote(note);
    }
    /**
     * 修改
     * @param note
     * @return
     */
    @Override
    public int update(StartNote note) {

        return startNoteMapper.update(note);
    }

    /**
     * 根据用户删除
     * @param note
     * @return
     */
    @Override
    public int delByUser(StartNote note) {
        return startNoteMapper.delByUser(note);
    }
}
